#define  _CRT_SECURE_NO_WARNINGS 1

#include<bits/stdc++.h>
#define sd(n) scanf("%d",&n) 
#define sld(n) scanf("%lld",&n)
#define pd(n) printf("%d", (n))
#define pld(n) printf("%lld", n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N = 2e5;
const int maxn = 1e6;
typedef long long int ll;
using namespace std;
//----------------------------------------------------------------------------//


int days[13] = { 0,31,28,31,30,31,30,31,31,30,31,30,31 };
bool check_day(int& year, int& month, int& day)
{
	if (month == 0 || month > 12) return false;
	if (day == 0) return false;
	if (month != 2)
	{
		if (day > days[month]) return false;
	}
	else
	{
		int leap = year % 100 && year % 4 == 0 || year % 400 == 0;
		if (day > 28 + leap) return false;
	}
	return true;
}